<script src="{{ getAssets }}js/echarts.common.min.js?v={{ assets_version }}"></script>
<script>
var echartsA = echarts.init(document.getElementById('tpl-echarts'));
	option = {
		tooltip: {
			trigger: 'axis'
		},
		grid: {
			top: '3%',
			left: '3%',
			right: '4%',
			bottom: '3%',
			containLabel: true
		},
		xAxis: [{
			type: 'category',
			boundaryGap: false,
			data: [{{range $k,$v := .statistics}} '{{$k}}', {{end}}]
		}],
		yAxis: [{
			type: 'value'
		}],
		textStyle: {
			color: '#838FA1'
		},
		series: [{
			name: '档案',
			type: 'line',
			stack: '总量',
			data: [{{range $k,$v := .statistics}} '{{$v}}', {{end}}]
		},
		{
			name: '验光',
			type: 'line',
			stack: '总量',
			data: [{{range $k,$v := .optometryStatistics}} '{{$v}}', {{end}}]
		}]
};
echartsA.setOption(option);


var echartsB = echarts.init(document.getElementById('tpl-echarts-retail'));
	option = {
		tooltip: {
			trigger: 'axis'
		},
		grid: {
			top: '3%',
			left: '3%',
			right: '4%',
			bottom: '3%',
			containLabel: true
		},
		xAxis: [{
			type: 'category',
			boundaryGap: false,
			data: [{{range $k,$v := .statistics}} '{{$k}}', {{end}}]
		}],
		yAxis: [{
			type: 'value'
		}],
		textStyle: {
			color: '#838FA1'
		},
		series: [{
			name: '销售',
			type: 'line',
			stack: '总量',
			data: [{{range $k,$v := .retails}} '{{$v}}', {{end}}]
		}]
};
echartsB.setOption(option);

</script>
